﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectProduct.aspx.cs" Inherits="HelloASPX.SelectProduct" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>修改商品信息</title>
    <link rel="stylesheet" href="./libs/particles/css/style.css" />
	<link rel="stylesheet" href="./css/base.css" />
	<link rel="stylesheet" href="./css/login.css" />
</head>
<body>
    <div id="particles-js"></div>
    <form id="form1" runat="server">
        <div id="wrapper">
			 <a  href="ProductList.aspx"><img src="./img/logo.png" style="width:300px;" /></a>
			<h2>修改商品信息</h2>
            <asp:DropDownList ID="SelectProductList" runat="server" DataSourceID="XmlDataSource1" DataTextField="pname" DataValueField="pid"  AppendDataBoundItems="True" OnSelectedIndexChanged="SelectProductList_SelectedIndexChanged">
                <asp:ListItem>---选择要修改的商品---</asp:ListItem>
            </asp:DropDownList>
            <asp:Button ID="Button1" runat="server" Text="查询商品信息" OnClick="Button1_Click" />
            <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/App_Data/products.xml" TransformFile="~/App_Data/products.xslt" XPath="/products/product"></asp:XmlDataSource>
            <asp:Panel ID="Panel1" runat="server" Visible="False">
                <ul class="group_input">
                    <li>
                        <asp:Image ID="productPhoto" runat="server" style="width:150px;height:200px; margin-left:70px; border:2px solid; margin-top:20px;margin-bottom:20px;"/>
                    </li>
                    <li>
                        商品名称：<asp:TextBox ID="productName" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        上架时间：<asp:TextBox ID="productTime" runat="server" TextMode="Date"></asp:TextBox>
                    </li>
                    <li>
                        商品图片：<asp:FileUpload ID="productImage1" runat="server" />不修改默认不变
                    </li>
                    <li>
                        商品价格：<asp:TextBox ID="productPrice" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        商品信息：<asp:TextBox ID="productInfo" runat="server"></asp:TextBox>
                    </li>
                </ul>
                <asp:Button ID="UpdateProduct" runat="server" Text="修改商品信息" class="submit_btn" OnClick="UpdateProduct_Click" />
                <asp:Button ID="DeleteProduct" runat="server" Text="删除商品信息" class="submit_btn deletebutton" OnClick="DeleteProduct_Click" />
            </asp:Panel>
         </div>
    </form>
    
	<script src="./libs/jquery-1.12.4/jquery.min.js"></script>
	<script src="./libs/sweetalert2/sweetalert2.min.js"></script>
	<script src="./libs/particles/particles.min.js"></script>
	<script src="./libs/particles/js/app.js"></script>
	
	<script>
        var count_particles, stats, update;
        stats = new Stats;
        stats.setMode(0);
        stats.domElement.style.position = 'absolute';
        stats.domElement.style.left = '0px';
        stats.domElement.style.top = '0px';
        document.body.appendChild(stats.domElement);
        count_particles = document.querySelector('.js-count-particles');
        update = function () {
            stats.begin();
            stats.end();
            if (window.pJSDom[0].pJS.particles && window.pJSDom[0].pJS.particles.array) {
                count_particles.innerText = window.pJSDom[0].pJS.particles.array.length;
            }
            requestAnimationFrame(update);
        };
        requestAnimationFrame(update);
    </script>
</body>
</html>
